<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main2" />
    <g:set var="entityName" value="${message(code: 'contact.label', default: 'Contact')}" />
    <title>联系人</title>
</head>

<script type="text/javascript">
    alert(this);
</script>

<body>
    <div class="main-body">
        <div class="page-wrapper">
            <!-- Page-header start -->
            <div class="page-header">
                <div class="page-header-title">
                    <h4>联系人拜访频率</h4>
                </div>

                <div class="page-header-breadcrumb">
                    <ul class="breadcrumb-title">
                        <li class="breadcrumb-item">
                            <a href="/salesDashboard/index">
                                <i class="icofont icofont-home"></i>
                            </a>
                        </li>
                        <li class="breadcrumb-item"><a href="#!">联系人拜访频率</a>
                        </li>
                    </ul>
                </div>
            </div>
            <!-- Page-body start -->
            <div class="page-body">
                <div class="card">
                    <div class="card-header">
                        <h5>联系人拜访频率</h5>

                        <div class="card-header-right">
                            <!-- <g:link action="create"><i class="ion-plus"></i> 新增</g:link> -->
                        </div>
                    </div>

                    <div class="card-block dt-responsive">

                        <div class="table-responsive">
                            <div id="dom-jqry_wrapper" class="dataTables_wrapper dt-bootstrap4">
                                <g:form method="POST" action="visitingFrequency">
                                    <div class="row m-0">
                                        <div class="col-md-8 p-l-0">
                                            <div id="order-table_filter" class="dataTables_filter text-left">
                                                <label>
                                                  <g:select class="form-control" id="year" name="year" value="${params?.year}" from="["2017", "2018"]" noSelection="${['年': '年']}"></g:select>

                                                    <!-- <select class="form-control" id="year" name="year" value="${params?.year}" >
                                                        <option value="年">年</option>
                                                        <option value="2017">2017</option>
                                                        <option value="2018">2018</option>
                                                    </select> -->
                                                    <g:select class="form-control" id="month" name="month" value="${params?.month}" from="[[key: '01', value: '一月'], [key: '02', value: '二月'], [key: '03', value: '三月'], [key: '04', value: '四月'],
                                                    [key: '05', value: '五月'], [key: '06', value: '六月'], [key: '07', value: '七月'], [key: '08', value: '八月'], [key: '09', value: '九月'], , [key: '10', value: '十月'], [key: '11', value: '十一月'],
                                                    [key: '12', value: '十二月']]" optionKey="key" optionValue="value" noSelection="${['月': '月']}"></g:select>
                                                    <%-- <select class="form-control" id="month" name="month" value="${params?.month}" >
                                                        <option value="月">月</option>
                                                        <option value="01">一月</option>
                                                        <option value="02">二月</option>
                                                        <option value="03">三月</option>
                                                        <option value="04">四月</option>
                                                        <option value="05">五月</option>
                                                        <option value="06">六月</option>
                                                        <option value="07">七月</option>
                                                        <option value="08">八月</option>
                                                        <option value="09">九月</option>
                                                        <option value="10">十月</option>
                                                        <option value="11">十一月</option>
                                                        <option value="12">十二月</option>
                                                    </select> --%>
                                                    <g:select class="form-control" id="level" name="level" value="${params?.level}" from="["A", "B", "C", "D"]" noSelection="${['': '分级']}"></g:select>
                                                    <!-- <select class="form-control" id="level" name="level" value="${params?.level}" >
                                                        <option value="分级">分级</option>
                                                        <option value="A">A</option>
                                                        <option value="B">B</option>
                                                        <option value="C">C</option>
                                                        <option value="D">D</option>
                                                    </select> -->
                                                </label>
                                            </div>
                                        </div>
                                        <div class="col-md-4 p-r-0 dt-buttons text-right">
                                            <button class="btn btn-inverse btn-sm btn-squeare" type="submit"><i class="fa fa-search"></i></button>
                                            %{-- <button class="btn btn-inverse btn-sm btn-squeare" type="button" id="resetBtn"><i class="fa fa-refresh"></i></button> --}%
                                        </div>
                                    </div>

                                </g:form>

                                <table class="table table-striped  table-bordered table-hover">
                                    <thead>
                                        <tr>
                                            <g:sortableColumn property="fullName" title="姓名" />
                                            <g:sortableColumn property="level" title="分级" />
                                            <g:sortableColumn property="standardCallFrequency" title="标准拜访频率(每月）" />
                                            <g:sortableColumn property="actualCallFrequency" title="实际拜访频率(每月）" />
                                            <g:sortableColumn property="completionRate" title="完成率" />
                                            <g:sortableColumn property="account" title="客户" />
                                            <g:sortableColumn property="user" title="所有人" />
                                            <g:sortableColumn property="createBy" title="创建人" />
                                            <g:sortableColumn property="modifyBy" title="修改人" />
                                            <g:sortableColumn property="createdDate" title="创建时间" />
                                            <g:sortableColumn property="modifiedDate" title="修改时间" />
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <g:each in="${contactList}">
                                            <tr>
                                                <td>
                                                    <g:link action="show" id="${it?.id}" class="firstTd">${it?.fullName}</g:link>
                                                </td>
                                                <td>${it?.level}</td>
                                                <td>${it?.standardCallFrequency}</td>
                                                <td>${it?.actualCallFrequency}</td>
                                                <td>${it?.comletionRate}</td>
                                                <td>${it?.account}</td>
                                                <td>${it?.user}</td>
                                                <td>${it?.createBy}</td>
                                                <td>${it?.modifyBy}</td>
                                                <td>
                                                    <g:formatDate format="yyyy-MM-dd HH:mm:ss" date="${it?.createdDate}" />
                                                </td>
                                                <td>
                                                    <g:formatDate format="yyyy-MM-dd HH:mm:ss" date="${it?.modifiedDate}" />
                                                </td>
                                            </tr>
                                        </g:each>
                                    </tbody>
                                </table>

                                <div class="dataTables_paginate">
                                    <div class="pagination">
                                        <g:paginate total="${contactCount ?: 0}" params="${params}" />
                                    </div>
                                </div>
                            </div>

                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</body>

</html>
